package main

import "fmt"

func main() {

	s := []int{1, 2, 3, 4}
	s1 := []int{6, 6, 6, 6, 6, 6, 6, 6}
	copy(s1, s)
	fmt.Println(s1) //[1 2 3 4 6 6 6 6]

	s2 := []int{6, 6, 6, 6}
	s3 := []int{1, 2, 3, 4}
	copy(s2, s3)
	fmt.Println(s2) //1,2,3,4

	s4 := []int{1, 2, 3, 4}
	s5 := []int{6, 6, 6, 6, 6, 6, 6, 6}
	copy(s4, s5)
	fmt.Println(s4) //[6 6 6 6]

}
